* {
    /* 初始化 取消页面的内外边距 */
    padding: 0;
    margin: 0;
    /* 修改盒模型 */
    box-sizing: border-box;
}

body {
    /* 弹性布局 让页面元素水平+垂直居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 让页面始终占浏览器总高 */
    height: 100vh;
    background: linear-gradient(45deg, #00ccff, #6600ff);
}

/* 计算器样式 */
.calc {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, .2);
    /* 毛玻璃背景 */
    background: rgba(255, 255, 255, .3);
    /* 毛玻璃效果 */
    backdrop-filter: blur(10px);
}

/* 显示屏 */
.screen {
    background: rgba(255, 255, 255, .7);
    padding: 20px;
}

#display {
    width: 100%;
    height: 40px;
    font-size: 24px;
    text-align: right;
    border: none;
    background: transparent;
    color: #333;
    outline: none;
}

/* 按钮区域 */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    padding: 20px;
}

button {
    font-size: 18px;
    padding: 30px;
    background: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .3s;
}

button:hover {
    background: #f0f0f0;
}

button:active {
    background: #d9d9d9;
}

button.clear {
    background: #ff4d4d;
    color: #fff;
}

button.clear:hover {
    background: #ff1a1a;
}

button.equals {
    background: #66bb6a;
    color: #fff;
    grid-row: span 2;
    grid-column: 4;
}

button.equals:hover {
    background: #45a049;
}